'use strict';
/* jshint mocha: true */
var path = require('path');
var expect = require('chai').expect;
var Injector = require('../');
var examplePath = path.resolve(__dirname, '../example');

describe('test-define-and-inject', function () {
    it('It should has injected correct recursive dependencies value', function () {
        var injector = new Injector([examplePath]);
        injector.defineAndInject(['recursive/entityA', 'recursive/entityB', 'recursive/entityC', 'recursive/entityD'], function (entityA, entityB, entityC, entityD) {
            expect(entityA).to.equal(1+entityB);
            expect(entityB).to.equal(2+entityC+entityD);
            expect(entityC).to.equal(4+entityD);
            expect(entityD).to.equal(8);
        });
    });
});